#define _CRT_SECURE_NO_WARNINGS 1

#include"stack.h"

namespace st
{
	void test1()
	{
		stack<int, std::vector<int>> st1;
		//stack<int> st1;
		st1.push(1);
		st1.push(2);
		st1.push(3);
		st1.push(4);
		st1.push(5);

		cout <<"size: " << st1.size() << endl;
		cout << "top: " << st1.top() << endl;
		
		while (!st1.empty())
		{
			cout << st1.top() <<" ";
			st1.pop();
		}
		cout << endl;
		cout << endl;
	}

	void test2()
	{
		stack<int, std::list<int>> st1;

		st1.push(11);
		st1.push(21);
		st1.push(31);
		st1.push(41);
		st1.push(51);

		cout << "size: " << st1.size() << endl;
		cout << "top: " << st1.top() << endl;

		while (!st1.empty())
		{
			cout << st1.top() << " ";
			st1.pop();
		}
		cout << endl;
		cout << endl;
	}
}


#include"queue.h"
namespace que
{
	void test1()
	{
		queue<int,std::list<int>> q1;
		q1.push(1);
		q1.push(2);
		q1.push(3);
		q1.push(4);
		q1.push(5);

		cout << q1.back() << endl;
		cout << q1.size() << endl;
		while (!q1.empty())
		{
			cout << q1.front() << " ";
			q1.pop();
		}
	}
}

int main()
{
	//st::test1();
	//st::test2();
	que::test1();


	return 0;
}